Chris Pollett > Old Classes >
CS157b

( Print View )

Student Corner:
  [Grades Sec1]
  [Grades Sec2]

  [Submit Sec1]
  [Submit Sec2]

  [Email List Sec1]
  [Email List Sec2]

  [
Lecture Notes]

Course Info:
  [Texts & Links]
  [Topics]
  [Grading]
  [HW Info]
  [Exam Info]
  [Regrades]
  [Honesty]
  [Announcements]

HW Assignments:
  [Hw1]  [Hw2]  [Hw3]
  [Hw4]  [Hw5]

Practice Exams:
  [Mid1]  [Mid2]  [Final]

                           












CS157b Spring 2005Practice Midterm 1

To study for the midterm I would suggest you: (1) Know how to do (by heart) all the practice problems. (2) Go over your notes three times. Second and third time try to see how huch you can remember from the first time. (3) Go over the homework problems. (4) Try to create your own problems similar to the ones I have given and solve them. (5) Skim the relevant sections from the book. (6) If you want to study in groups, at this point you are ready to quiz each other. The practice midterm is below. Here are some facts about the actual midterm: (a) The midterm will be in class Mar 2. (b) It is closed book, closed notes. Nothing will be permitted on your desk except your pen (pencil) and test. (c) You should bring photo ID. (d) There will be more than one version of the test. Each version will be of comparable difficulty. (e) If your cell-phone or beeper goes off you will be excused from the test at that point and graded on what you have done till your excusal. (f) One problem (less typos) on the actual test will be from the practice test.

Student Generated Solutions-PDF.

1. Draw a diagram for the memory hierarchy.

2. Suppose we have a 1,000,000 block file where blocks are 4K each. We have 100M of memory available to do sorting. Estimate the number of disk I/Os needed to completely sort the file.

3. Briefly explain how the elevator scheduling algorithm works.

4. Explain and give an example illustrating how RAID level 5 differs from RAID level 4.

5. Give an example of three things that might be stored in a record header and three things that might be stored in a block header.

6. Explain the difference between swizzling automatically and swizzling on demand.

7. Suppose 50 records for some table T can fit into a 4k block. Suppose an index entry takes 16 bytes and we can completely fill all but 64 bytes of an index block. If T takes 500 million blocks to store, how many blocks would a dense index on T be? How many block would a sparse index take?

8. Give an example situation with a actual B-tree where deleting a record from this tree would result in the tree having one fewer levels.

9. What kind of query would it be better to have a B-tree index for than a hash index?

10. Briefly explain how extensible hashing works.